/*
# 逆向最长匹配的中文分词算法
	@param	text 	待处理的文字
	@param	dictionary 	词典
	@return List<String> 单词列表
*/
public static List<String> segmentBackwordLongest(String text,TreeMap<String,CoreDictionary.Attribute> dictionary)
{
	List<String> wordList = new LinkedList<String>();

	for(int i=text.length()-1;i>=0; ){
		String longestWord = text.substring(i,i+1);

		for(int j=0;j<=i;++j){
			String word = text.substring(j,i+1);

			if(dictionary.containKey(word)){
				if(word.length() > longestWord.length()){
					longestWord = word;
					break;
				}
			}	
		}

		wordList.add(0,longestWord); // 从wordList的index = 0的地方加入
			// 

		i -= longestWord.length();
	}

	return wordList;
}